<%-- 
    Document   : NewDetails
    Created on : Oct 8, 2012, 3:04:30 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="error.jsp"%>
<%@page import="java.sql.*" %>
<%@page import="java.util.*" %>
<%@page import="org.apt.connectDB.MyConnect" %>
<%@page import="org.apt.Bean.NewEntities" %>
<%@page import="com.myapp.DAO.NewsDao" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="website description" />
        <meta name="keywords" content="website keywords, website keywords" />
        <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1#" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
        <link rel="stylesheet" type="text/css" href="style/style.css" />
        <link rel="stylesheet" type="text/css" href="style/styleclient.css" />
        <style>
            * {font-family:Arial, Helvetica, sans-serif;
               font-size:10pt;}
            </style>
            <title>New details</title>
        </head>
        <body>
            <div>
                <div><%@include file="UserTemplate/Banner.jsp" %></div>
                <div id="site_content">
                    <form action="listNews"  method="post"  name="fnews" id="fnew">
                        <div id="content">
                            <%
                                        String newsid = request.getParameter("id");
                                        if (newsid != null) {

                                            NewEntities news = NewsDao.getNewsByID(Integer.parseInt(newsid));
                                            if (news != null) {%>
                            <table id="tbnewdetail" class="tableRegiter">
                                <tr>
                                    <td><span class="tihle"><%=news.getTile()%></span></td>
                                </tr>
                                <tr>
                                    <td><span id="sumary"  style="font-size: 16px; color: gray;font-style: italic">"<%=news.getSummary()%>"</span></td>
                                </tr>
                                <tr>
                                    <td><span id="imagedetails"><center><img class="img" src="images/imagemember/<%=news.getImage()%>" width="90%" height="300px"></center> </span></td>
                                </tr>
                                <tr>
                                    <td><%=news.getContent()%></td>
                                </tr>
                                <tr>
                                    <td class="author" >
                                        <span style="float: left"><script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 0px; height:15px; border:1px solid #d8dfea; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top right; text-decoration:none; } </style> <a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share on facebook</a></span>
                                    <span >Author: <%=news.getAuthor()%></span></td>
                            </tr>
                        </table>
                        <%}
                                    }%>
                    </div>
                </form>
                <div><%@include file="UserTemplate/MenuRight.jsp" %></div>
            </div>
            <div></div>
            <div><%@include file="UserTemplate/Footer.jsp" %></div>
        </div>
    </body>
</html>
